import React from 'react';
import { Button, Modal, Table } from 'antd';
import { useState } from 'react';

function useModal() {
    const [visible, setVisible] = useState(false);

    const handleOperation = () => {
        // 显示提示信息
        alert('申请成功');
    };

    return { visible, handleOperation };
}

const ModalWithTable: React.FC = () => {
    const { visible, handleOperation } = useModal();

    return (
        <div>
            <Button type="primary" onClick={handleOperation}>
                申请比对测试
            </Button>
        </div>
    );
};

export default ModalWithTable;